package com.zhongkun.datahome.service.repository;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhongkun.datahome.service.domain.TaskProgress;
import com.zhongkun.datahome.service.mapper.TaskProgressMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: huangjie
 * @Date: 2025/4/14 17:15
 * @Desc
 */
@Repository
public class TaskProgressRepository extends ServiceImpl<TaskProgressMapper, TaskProgress> {

    public List<TaskProgress> listByTaskId(Long id) {
        return lambdaQuery().eq(TaskProgress::getTaskId, id).list();
    }

    public void removeByTaskId(Long id) {
        remove(new LambdaQueryWrapper<TaskProgress>().eq(TaskProgress::getTaskId, id));
    }
}
